package com.jichaoyun.model.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Time;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhangzhen
 * @since 2023-11-11
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("stationInfo")
public class StationInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 站号
     */
    @ExcelProperty(value = "站点编号",index = 0)
    @TableId(type = IdType.AUTO)
    private Integer stationNo;


    @ExcelIgnore
    @TableLogic(value = "0",delval ="1")
    private Integer isDeleted;

    /**
     * 站点名称
     */
    @ExcelProperty(value = "站点名称",index = 1)
    private String stationName;

    /**
     * 是否使用
     */
    @ExcelProperty(value = "启用状态",index = 2)
    private Boolean isUse;

    /**
     * 用户id
     */
    @ExcelProperty(value = "所属用户编号",index = 3)
    private Integer userId;

    /**
     * 线路类型id
     */
    @ExcelProperty(value = "所属线路编号",index = 4)
    private Integer lineId;

    /**
     * 总表/分表类型 1分表 0 总表
     */
    @ExcelProperty(value = "是否分表",index = 5)
    private Integer userType;

    /**
     * 仪表类型
     */
    @ExcelProperty(value = "仪表类型",index = 6)
    private String ybType;

    /**
     * 仪表地址编号
     */
    @ExcelProperty(value = "仪表地址",index = 7)
    private Integer addr;

    /**
     * gprs编号
     */
    @ExcelProperty(value = "DTU编号",index = 8)
    private String gprsId;

    /**
     * 通讯类型
     */
    @ExcelProperty(value = "通讯类型",index = 9)
    private String comType;

    /**
     * 温度量程
     */
    @ExcelProperty(value = "站点编号",index = 10)
    private Float trange;

    /**
     * 压力量程
     */
    @ExcelProperty(value = "压力量程",index = 11)
    private Float prange;

    /**
     * 流量量程
     */
    @ExcelProperty(value = "流量量程",index = 12)
    private Float frange;

    /**
     * 流量下限报警
     */
    @ExcelProperty(value = "流量下限报警",index = 13)
    private Float fdowna;

    /**
     * 温度上限报警
     */
    @ExcelProperty(value = "温度上限报警",index = 14)
    private Float tupa;

    /**
     * 温度下限报警
     */
    @ExcelProperty(value = "温度下限报警",index = 15)
    private Float tdowna;

    /**
     * 压力上限报警
     */
    @ExcelProperty(value = "压力上限报警",index = 16)
    private Float pupa;

    /**
     * 压力下限报警
     */
    @ExcelProperty(value = "压力下限报警",index = 17)
    private Float pdowna;

    /**
     * 流量上限报警
     */
    @ExcelProperty(value = "流量上限报警",index = 18)
    private Float fupa;

    /**
     * 通讯ip
     */
    @ExcelProperty(value = "通讯IP",index = 34)
    private String comIp;

    /**
     * tcp端口
     */
    @ExcelProperty(value = "TCP端口",index = 35)
    private String tcpAddr;

    /**
     * udp端口
     */
    @ExcelProperty(value = "UDP端口",index = 36)
    private String udpAddr;

    /**
     * 结算小时
     */
    @ExcelProperty(value = "每日结算时间（小时）",index = 22)
    private Integer accountHour;

    /**
     * 结算日期
     */
    @ExcelProperty(value = "每月结算时间（日期）",index = 23)
    private Integer accountDate;

    /**
     * 通讯串口
     */
    @ExcelProperty(value = "通讯串口",index = 24)
    private String comPort;

    /**
     * 存储时长，月
     */
    @ExcelIgnore
    private Integer storageTime;

    /**
     * 是否是主要用户
     */
    @ExcelProperty(value = "是否主要用户",index = 25)
    private Boolean isMaster;

    /**
     * 低计量流量，每小时最小消费
     */
    @ExcelProperty(value = "低计量流量，每小时最小消费",index = 26)
    private Float minConsume;

    /**
     * 余额
     */
    @ExcelProperty(value = "余额",index = 27)
    private BigDecimal balance;

    /**
     * 余额预警
     */
    @ExcelProperty(value = "余额报警值",index = 28)
    private BigDecimal balanceAlarm;

    /**
     * 最大透支
     */
    @ExcelProperty(value = "最大透支",index = 29)
    private BigDecimal maxOverdraft;

    /**
     * 采集周期，秒
     */
    @ExcelProperty(value = "采集周期",index = 30)
    private Integer collectionCircle;

    /**
     * 存储周期，秒
     */
    @ExcelProperty(value = "存储周期",index = 31)
    private Integer storageCircle;

    /**
     * 指令周期，秒
     */
    @ExcelProperty(value = "指令周期",index = 32)
    private Integer instructCircle;

//    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
//    @ExcelProperty(value = "每日短信发送起始时间",index = 33)
    @ExcelIgnore
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Time sentTimeStart;

//    @ExcelProperty(value = "每日短信发送结束时间",index = 34)
    @ExcelIgnore
    @DateTimeFormat(pattern = "HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm:ss")
    private Time sentTimeEnd;

    @ExcelIgnore
    private int comPassword;

    @ExcelProperty(value = "手机号码",index = 33)
    private String tel;

    @ExcelIgnore
    private Integer isLeaf;

    @ExcelIgnore
    private Integer fatherStationNo;

    @ExcelProperty(value = "频率下限报警",index = 19)
    private Float fredowna;

    @ExcelProperty(value = "频率上线报警",index = 20)
    private Float freupa;

    @ExcelProperty(value = "银行卡号",index = 21)
    private String bankCardNumber;

    @ExcelProperty(value = "app用户Id",index = 37)
    private Integer appUserId;

    @ExcelIgnore
    private BigDecimal price;

    @ExcelProperty(value = "IC卡号",index = 38)
    private String icCardNum;
    @ExcelProperty(value = "口径",index = 39)
    private Float caliber;
    @ExcelIgnore
    private Float upFlow;
    @ExcelIgnore
    private Float downFlow;
    @ExcelIgnore
    private Float upWater;
    @ExcelIgnore
    private Float downWater;
    @ExcelIgnore
    private String stationType;
    @ExcelIgnore
    private BigDecimal priceHour;
    @ExcelIgnore
    private BigDecimal coupon;
    @ExcelIgnore
    private Float xishu;
    @ExcelIgnore
    private Float pipelossRate;

    @ExcelIgnore
    private String mes1;
    @ExcelIgnore
    private String mes2;
    @ExcelIgnore
    private String mes3;
    @ExcelIgnore
    private String mes4;
    @ExcelIgnore
    private String mes5;
    @ExcelIgnore
    private String mes6;
    @ExcelIgnore
    private String mes7;
    @ExcelIgnore
    private String mes8;

    /**
     * 是否是频率
     */
    @ExcelIgnore
    private Boolean isFre;

}
